const seq = require('sequelize')
const time = require('../time')
module.exports = {
  NAME: 'page',
  TABLE: {
    page_id: {
      type: seq.INTEGER(11),
      primaryKey: true,
      unique: true,
      autoIncrement: true,
      comment: 'page_id 主键，自增',
      field: 'page_id' //  相应的字段名称
    },
    name: {
      type: seq.STRING(64),
      comment: '页面名称',
      field: 'name'
    },
    thumb: {
      type: seq.STRING(128),
      comment: '页面图片',
      field: 'thumb'
    },
    project_id: {
      type: seq.INTEGER(11),
      comment: 'project_id',
      field: 'project_id' //  相应的字段名称
    },
    layout: {
      type: seq.STRING(128),
      defaultValue: 0,
      comment: '布局方式(absolute,)',
      field: 'layout',
      defaultValue: "absolute",
    },
    publish: {
      type: seq.INTEGER(2),
      defaultValue: 0,
      comment: '发布(0未发布,1已发布)',
      field: 'publish'
    },
    remark: {
      type: seq.TEXT,
      comment: '备注',
      field: 'remark',
    },
    page_url: {
      type: seq.TEXT,
      comment: '页面地址',
      field: 'page_url',
    },
    ...time.create_date,
    ...time.update_date,
    ...time.delete_date,
    ...time.create_by,
    ...time.update_by,
    ...time.delete_by
  }
}
